#ifndef MYCOIN_H
#define MYCOIN_H

#include <QWidget>
#include <QPushButton>
#include <QTimer>
#include <QMouseEvent>
class MyCoin : public QPushButton
{
    Q_OBJECT
public:
    explicit MyCoin(QWidget *parent = nullptr);
    MyCoin(QString img);
    void setFlag(bool flag);
    void setPx(int);
    void setPy(int);
    int getPx();
    int getPy();
    void changeflag();
    void isWin();
    bool getflag(){return flag;}
    QString print();
    void mousePressEvent(QMouseEvent* ev);

signals:

public:
    int posx;
    int posy;
    bool flag; //正反标志
    //行为定时器
    QTimer * timer1;
    QTimer * timer2;
    //图片名字索引
    int min;
    int max;
    bool win;
};

#endif // MYCOIN_H
